/*
 * @Author: your name
 * @Date: 2021-03-26 09:07:49
 * @LastEditTime: 2021-04-27 17:42:20
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \testc:\Users\JOJO\Desktop\vue-demo\my-app\src\main.js
 */
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import router from "./router";
import store from "./store/index";
import axios from "./axios/index.js";
import "./utils/component-creat.js";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import { Icon } from "ant-design-vue";
import VueParticles from "vue-particles";
import VueAMap from "vue-amap";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(VueAMap);
// //自定义map点坐标图标
// new VueAMap.Icon({
//   image: "./assets",
//   size: new VueAMap.Size(2, 2),
//   imageSize: new VueAMap.Size(2, 2)
// });

import NProgress from "nprogress";
import "nprogress/nprogress.css";
router.beforeEach((to, from, next) => {
  NProgress.start();
  next();
});

router.afterEach(() => {
  NProgress.done();
});
VueAMap.initAMapApiLoader({
  //集合秘钥key
  key: "348bb8d6141abb64188da42f66b9a411",
  //插件集合
  plugin: [
    "AMap.Autocomplete", //输入提示插件
    "AMap.PlaceSearch", //POI搜索插件
    "AMap.Scale", //右下角缩略图插件 比例尺
    "AMap.OverView", //地图鹰眼插件
    "AMap.ToolBar", //地图工具条
    "AMap.MapType", //类别切换控件，实现默认图层与卫星图、实施交通图层之间切换的控制
    "AMap.PolyEditor", //编辑 折线多，边形
    "AMap.CircleEditor", //圆形编辑器插件
    "AMap.Geolocation", //定位控件，用来获取和展示用户主机所在的经纬度位置
    "AMap.Driving" //路线规划
  ]
});

Vue.use(VueParticles);
Vue.use(Icon);
Vue.use(ElementUI);
Vue.config.productionTip = false;
Vue.prototype.$axios = axios;

/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  store,
  components: { App },
  template: "<App/>"
});
